<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <p:menubar>
        <p:menuitem >
            <p:selectOneMenu style="width: 200px; vertical-align: middle" value="#{generateBackingBean.projectName}">
                <f:ajax listener="#{generateBackingBean.projectSelected}"  render="@form"/>
                <c:forEach items="#{codeGeneratorBackingBean.projects}" var="project">
                    <f:selectItem itemLabel="#{project.name}" itemValue="#{project.name}"/>
                </c:forEach>
            </p:selectOneMenu>
            
        </p:menuitem>
        <p:menuitem style="vertical-align: middle">
            <p:commandButton value="Generar" action ="#{generateBackingBean.onAction}" style="vertical-align: middle" icon="ui-icon-gear" ajax="false"/>
        </p:menuitem>
    </p:menubar>
</html>